package cn.kimoon.dau_android.Model;

import java.util.ArrayList;
import java.util.LinkedList;

/**
 * Created by xiangdong on 2016/12/1.
 */

public class ModelCollectorInfo {
    public int id;                                          // 采集器id
    public String name;                                     // 名字
    public int state;                                       // 状态，0-正常 1-异常
    public int temperature_secure_line_upper;               // 温度报警阈值上限
    public int temperature_secure_line_lower;               // 温度报警阈值下限
    public LinkedList<ModelContactItem> temperature;        // 温湿度
    public LinkedList<ModelContactItem> contact;            // 干接点(报警)
    public LinkedList<ModelContactItem> control_contact;    // 控制接点
    public ModelCollectorPower power_consumpsion;           // 电量

    public LinkedList<Integer> getControlContactRequestArray() {
        LinkedList<Integer> list = new LinkedList<>();
        for (ModelContactItem item : control_contact) {
            list.add(item.value);
        }
        return list;
    }
}
